package ${packageName};

import org.jow.core.InputStream;
import org.jow.core.OutputStream;

<#if importPackages??>
<#list importPackages as package>
import ${package};
</#list>
</#if>
import org.jow.core.gen.JowGenFile;

@JowGenFile
public final class ${proxyName}{
	
	/**
	 *
	 * 取得属性值
	 * @param classInstance 实例
	 * @key 属性名称
	 *
	 */
	public static void write(OutputStream out, ${className} classInstance) {
		<#list fields as field>
		<#if field.type!="boolean">
		out.write(classInstance.get${field.name}());
		<#else>
		out.write(classInstance.is${field.name}());
		</#if>
		</#list>
	}
	
	/**
	 *
	 * 设置属性值
	 * @param classInstance 实例
	 * @key 属性名称
	 * @value 属性值
	 *
	 */
	public static void read(InputStream in, ${className} classInstance){
		<#list fields as field>
		classInstance.set${field.name}(in.read());
		</#list>
	}
	
}
